package com.woniu.liuzhougov.systemSettings.service.impl;

import com.woniu.liuzhougov.itemAndTask.dao.CheckStatusMapper;
import com.woniu.liuzhougov.itemAndTask.pojo.CheckStatus;
import com.woniu.liuzhougov.systemSettings.service.CheckStatusService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @Description: 系统参数设置服务实现层
 * @author: Tang
 * @createDate: 2019/4/19 0018
 * @version: 1.0
 */
@Service
public class CheckStatusServiceImpl implements CheckStatusService {

    @Resource
    private CheckStatusMapper checkStatusMapper;

    @Override
    public List<CheckStatus> selAll(){
        return checkStatusMapper.selectAll();
    }

    @Override
    public String insert(CheckStatus checkStatus) {
        try {
            checkStatusMapper.insertSelective(checkStatus);
        }catch (Exception e){
            return "false";
        }
        return "success";

    }

    @Override
    public String update(CheckStatus checkStatus) {
        try {
            checkStatusMapper.updateByPrimaryKey(checkStatus);
        }catch (Exception e){
            return "false";
        }
        return "success";
    }

    @Override
    public String delete(int checkStatusId) {
        try {
            checkStatusMapper.deleteByPrimaryKey(checkStatusId);
        }catch (Exception e){
            return "false";
        }
        return "success";
    }

}
